package extration;

import java.util.Comparator;

public class MyComparator3 implements Comparator<Mot>{

	private String polarite;
	
	public MyComparator3(String p){
		polarite = p;
	}
	@Override
	public int compare(Mot o1, Mot o2) {
		if(o1.getKhiPolarite(polarite) > o2.getKhiPolarite(polarite)){
			return 1;
		}
		else if(o1.getKhiPolarite(polarite) < o2.getKhiPolarite(polarite)){
			return -1;
		}
		
		return 0;
	}
}
